package com.zsxb.crm.result;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;

/**
 * 2024/10/28
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserResult extends Result implements Serializable {
    private List roleIds;
    private List roles;
    private Object data;

    public static UserResult success(Object data, List roleIds, List roles) {
        UserResult result = new UserResult();
        result.setCode(200);
        result.setMsg("成功");
        result.setData(data);
        result.setRoleIds(roleIds);
        result.setRoles(roles);
        return result;
    }
}
